import java.util.Scanner;

public class Test1 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println("请输入5个数字");
		int[] numArray = new int[5];
		for(int i=0;i<5;i++) {
			numArray[i] = sc.nextInt();
		}
		System.out.println("请输入要查找的数字");
		int num = sc.nextInt();
		int numindex = findNum(numArray,num);
		if(numindex < 0) {
			System.out.println("该数组中不存在要查找的数字");
		}else{
			
			System.out.println("数字在该数组中的位置是"+(numindex+1));
		}
	}
	public static int findNum(int[] array,int num) {
		for(int i=0;i<array.length;i++) {
			
			if(array[i]==num) {
				return i;
			}
		}
		return -1;
	}

}
